package com.youle.askdao.service.impl;

import com.youle.askdao.common.result.ResultException;
import com.youle.askdao.dao.UserMapper;
import com.youle.askdao.entity.bean.User;
import com.youle.askdao.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: create by MrGe
 * @version: v1.0
 * @description: com.youle.askdao.service.impl
 * @date:2019-07-23
 */

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> selectAll() throws ResultException {
        List<User> users = userMapper.selectAll();
        if (users != null) {
            return users;
        }
        return null;
    }
}
